package com.qdu.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.qdu.entity.Report;
import com.qdu.service.ReportService;

@Controller
@RequestMapping("/report")
public class RoportController {

	@Autowired
	private ReportService reportService;
	
	@GetMapping("/Report")
	public String Report(Report report) {
		reportService.addReport(report);
		return "index";
	}
	
	@GetMapping("/Reportpage/{Uid}")
	public String toReportPage(@PathVariable String Uid,Model model) {
		model.addAttribute("Uid",Uid);
		return "Report_page";
	}
		
		
	
	
	
	
	 
}
